Check if completion is non-NULL before accessing it. Oops.
authorKristian Rietveld <kris@gtk.org>
Sat, 11 Oct 2003 17:10:37 +0000 (17:10 +0000)
committerKristian Rietveld <kristian@src.gnome.org>
Sat, 11 Oct 2003 17:10:37 +0000 (17:10 +0000)
Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>

* gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
non-NULL before accessing it. Oops.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkentry.c

index ce273f046e8ee887223a9f834757501ab955a59a..67208be49afb82b7570e115508818a153c567649 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
+       non-NULL before accessing it. Oops.
+
 Sat Oct 11 15:47:03 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action),
index ce273f046e8ee887223a9f834757501ab955a59a..67208be49afb82b7570e115508818a153c567649 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
+       non-NULL before accessing it. Oops.
+
 Sat Oct 11 15:47:03 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action),
index ce273f046e8ee887223a9f834757501ab955a59a..67208be49afb82b7570e115508818a153c567649 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
+       non-NULL before accessing it. Oops.
+
 Sat Oct 11 15:47:03 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action),
index ce273f046e8ee887223a9f834757501ab955a59a..67208be49afb82b7570e115508818a153c567649 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
+       non-NULL before accessing it. Oops.
+
 Sat Oct 11 15:47:03 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action),
index ce273f046e8ee887223a9f834757501ab955a59a..67208be49afb82b7570e115508818a153c567649 100644 (file)
@@ -1,3 +1,8 @@
+Sat Oct 11 19:09:05 2003  Kristian Rietveld  <kris@gtk.org>
+
+       * gtk/gtkentry.c (gtk_entry_set_text): Check if completion is
+       non-NULL before accessing it. Oops.
+
 Sat Oct 11 15:47:03 2003  Kristian Rietveld  <kris@gtk.org>
 
        * gtk/gtkentrycompletion.[ch] (gtk_entry_completion_insert_action),
index 268d35dc332471d65603806219f67cb73b71a3a7..215748e000198403fec761ec18be80a6c42f1197 100644 (file)
@@ -3453,7 +3453,8 @@ gtk_entry_set_text (GtkEntry    *entry,
   g_return_if_fail (text != NULL);
 
   completion = gtk_entry_get_completion (entry);
-  g_signal_handler_block (entry, completion->priv->changed_id);
+  if (completion)
+    g_signal_handler_block (entry, completion->priv->changed_id);
 
   /* Actually setting the text will affect the cursor and selection;
    * if the contents don't actually change, this will look odd to the user.
@@ -3466,7 +3467,8 @@ gtk_entry_set_text (GtkEntry    *entry,
   tmp_pos = 0;
   gtk_editable_insert_text (GTK_EDITABLE (entry), text, strlen (text), &tmp_pos);
 
-  g_signal_handler_unblock (entry, completion->priv->changed_id);
+  if (completion)
+    g_signal_handler_unblock (entry, completion->priv->changed_id);
 }
 
 void